﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Master.Master" AutoEventWireup="true" CodeBehind="Show.aspx.cs" Inherits="NoteSystem.Show" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    
    <script>
        function alertReply(comment_id) {
            window.open("Reply.aspx?cid=" + comment_id);
           
        }
        function delComment(cid) {
            //ajax
            var xhttp;
            if (window.XMLHttpRequest) {
                xhttp = new XMLHttpRequest();
            } else {
                // code for IE6, IE5
                xhttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            xhttp.onreadystatechange = function () {
                if (this.readyState == 4 && this.status == 200) {
                    var result = xhttp.responseText;
                    if (result == "true") {
                        alert('删除成功');
                        window.location.reload();
                    }
                }
            };
            xhttp.open("GET", "DelCommentHandler.ashx?cid=" + cid, true);
            xhttp.send();

        }
        function delReply(rid) {
            //删除
            var xhttp;
            if (window.XMLHttpRequest) {
                xhttp = new XMLHttpRequest();
            } else {
                // code for IE6, IE5
                xhttp = new ActiveXObject("Microsoft.XMLHTTP");
            }
            xhttp.onreadystatechange = function () {
                if (this.readyState == 4 && this.status == 200) {
                    var result = xhttp.responseText;
                    if (result == "true") {
                        alert('回复删除成功');
                        window.location.reload();
                    }
                }
            };
            xhttp.open("GET", "DelReplyHandler.ashx?rid=" + rid, true);
            xhttp.send();

        }

    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
      <!--右半部分-->
        <div class="box_right col-lg-9 ">
            <div class="segment left">

                <i class=" glyphicon glyphicon-book left"></i>
                <h3 class="left">
                    日志内容<br>
                    <span>管理这个设备及其传感器</span>
                </h3>
            </div>

            <div class="clear"></div>


           <!--发布日志-->
        <%=InitNote() %>
        <!--评论开始-->
        <%=InitComment() %>
            <!--提交留言-->
            <div id="rizhi_box" class="left" style="padding-left:30px; padding-top:10px;">
                <div method="post" action="/" role="form" autocomplete="on">
                    <div class="my-group" id="group2">
                        <span class="left"><mark>*</mark>留言板：</span>
                        <textarea runat="server" id="txtSpeak" type="text" class="form-control put3 put5" placeholder="请输入内容">
             </textarea>
                    </div>
                    <div class="form-actions">
                        <asp:Button ID="btnCommit" CssClass="btn-primary btn" runat="server" Text="确认提交" OnClick="btnCommit_Click" />
                                     
                    </div>
                </div>
            </div>
        </div>
</asp:Content>
